package com.day0009;
//商品类
public  class Goods {
    private String name;
    private int id;
    private double price;

    public Goods() {
    }

    public Goods(String name, int id, double price) {
        this.name = name;
        this.id = id;
        this.price = price;
    }

    public  void show(){
        System.out.println(name);
        System.out.println("商品名称:"+getName());
        System.out.println("id:"+getId());
    };

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
